@extends('admin.register.common')

@section('content')


    {{--    <script src="{{asset('/common/js/validation/jquery.validate.min.js')}}"></script>--}}
    <form action="registerInfo" method="post" class="form-horizontal" enctype="multipart/form-data">
        {{csrf_field()}}
        <input type="hidden" name="country" value="{{$country}}">
        <input type="hidden" name="language" value="{{$language}}">
        <input type="hidden" name="type" value="{{$type}}">
        <input type="hidden" name="software_id" value="{{$software_id}}">
        <div class="row">
            <div class="col-lg-6">
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-5 required">公司/厂牌名：</label>
                    <div class="col-md-6 col-sm-6">
                        <input type="text" class="form-control" name="team" placeholder="请输入" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-5 required">联系人：</label>
                    <div class="col-md-6 col-sm-6">
                        <input type="text" class="form-control" name="phone_name" placeholder="请输入" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-5 required">联系人职务：</label>
                    <div class="col-md-6 col-sm-6">
                        <input type="text" class="form-control" name="business" placeholder="请输入" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-5 required">手机号码：</label>
                    <div class="col-md-4 col-sm-4">
                        <input type="text" id="phone" class="form-control" name="phone" placeholder="请输入" required>
                    </div>
                    <div class="col-lg-2">
                        <button type="button" class="btn btn-danger" onclick=aliSmsCode()>点击获取</button>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-5 required">验证码：</label>
                    <div class="col-md-6 col-sm-6">
                        <input type="text" class="form-control" name="code" placeholder="请输入" required>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-3 required">公司主要业务：</label>
                    <div class="col-md-6 col-sm-6">
                        <select name="company_business" class="form-control" required>
                            <option value="">--请选择--</option>
                            <option value="1">音乐生产</option>
                            <option value="2">艺人管理/经营</option>
                            <option value="3">版权管理/代理</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-3 required">版权数量：</label>
                    <div class="col-md-6 col-sm-6">
                        <select name="copyright_number" class="form-control" required>
                            <option value="">--请选择--</option>
                            <option value="1">100首以内</option>
                            <option value="2">101-500首</option>
                            <option value="3">501-3000首</option>
                            <option value="4">3001首以上</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-3 required">所在省市：</label>
                    <div class="col-md-6 col-sm-6">
                        <select class="form-control" name="provice" id="" required>
                            <option value="">--请选择--</option>
                            <option value="北京市">北京市 </option>
                            <option value="天津市">天津市 </option>
                            <option value="上海市">上海市 </option>
                            <option value="重庆市">重庆市 </option>
                            <option value="河北省">河北省 </option>
                            <option value="山西省">山西省 </option>
                            <option value="辽宁省">辽宁省 </option>
                            <option value="吉林省">吉林省 </option>
                            <option value="黑龙江省">黑龙江省</option>
                            <option value="江苏省">江苏省 </option>
                            <option value="浙江省">浙江省 </option>
                            <option value="安徽省">安徽省 </option>
                            <option value="福建省">福建省 </option>
                            <option value="江西省">江西省 </option>
                            <option value="山东省">山东省 </option>
                            <option value="河南省">河南省 </option>
                            <option value="湖北省">湖北省 </option>
                            <option value="湖南省">湖南省 </option>
                            <option value="广东省">广东省 </option>
                            <option value="海南省">海南省 </option>
                            <option value="四川省">四川省 </option>
                            <option value="贵州省">贵州省 </option>
                            <option value="云南省">云南省 </option>
                            <option value="陕西省">陕西省 </option>
                            <option value="甘肃省">甘肃省 </option>
                            <option value="青海省">青海省 </option>
                            <option value="广西壮族自治区">广西壮族自治区</option>
                            <option value="内蒙古自治区">内蒙古自治区</option>
                            <option value="西藏自治区">西藏自治区</option>
                            <option value="宁夏回族自治区">宁夏回族自治区 </option>
                            <option value="新疆维吾尔自治区">新疆维吾尔自治区</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-3 required">社会统一编码：</label>
                    <div class="col-md-6 col-sm-6">
                        <input type="text" class="form-control" name="society_code" placeholder="请输入" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAccount9" class="col-sm-3 required">营业执照上传：</label>
                    <div class="col-md-4 col-sm-4" style="position:relative;">
                        <input type="file" class="upload_file" name="business_license" onchange="doChange(this)" style="display:none;"/>
                        <input name="businesslicense" class="photoCover form-control" type="text" required placeholder="请上传营业执照" disabled="disabled">
                        <input type="button" name="businesslicense2" required onclick="$('input[class=upload_file]').click();" class="btn btn-danger mybutton" value="浏览" style="width:78px;position: absolute;top:0;left:306px;"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group btnBox">
            <div class="col-sm-12">
                <button type="submit" class="btn btn-danger">下一步</button>
            </div>
        </div>
        @if (count($errors) > 0)
            <div class="alert alert-danger">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{$error}}</li>
                    @endforeach
                </ul>
            </div>
        @endif
    </form>
    @include('flash::message')
    <script>
        function doChange(file){
            var upload_file = $.trim($(".upload_file").val());    //获取上传文件
            $('.photoCover').val(upload_file);     //赋值给自定义input框
        }
    </script>
@endsection
<script>
    function aliSmsCode(){
        var phone = $('#phone').val();
        $.post('{{url('admin/aliSmsCode')}}',{'phone':phone},function(){

        });
    }
</script>
